Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python#68
Glasgow | Prati Amalden | Module Complexity | Sprint 1 | Analyse and Refactor in python#68PratiAmalden wants to merge 1 commit intoCodeYourFuture:mainfrom
Conversation
|
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR couldn't be matched to an assignment in this module. Please check its title is in the correct format, and that you only have one PR per assignment. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
| total_sum = 0 | ||
| total_product = 1 |
There was a problem hiding this comment.
Both names seem to be longer than necessary. sum and product are meaningful enough.
| for item in first_sequence: | ||
| if item in second_set and item not in seen: | ||
| seen.add(item) | ||
| common_items.append(item) |
There was a problem hiding this comment.
Code is correct.
Could consider taking advantage of built-in methods of a set -- less code and more efficient.
https://realpython.com/python-sets/
No description provided.